/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * UIViewerReport.java
 *
 * Created on 12/04/2011, 11:52:04
 */

package viviendas.gui.reports;

import javax.swing.event.InternalFrameAdapter;
import javax.swing.event.InternalFrameEvent;

/**
 *
 * @author desarrollo
 */
public class UIViewerReport extends javax.swing.JInternalFrame {

    /** Creates new form UIViewerReport */
    private UIViewerReport() {
        initComponents();
        addInternalFrameListener(new InternalFrameAdapter() {

            @Override
            public void internalFrameClosing(InternalFrameEvent e) {
                formInternalFrameClosed(e);
            }

        });
        setSize(700, 600);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        setClosable(true);
        setIconifiable(true);
        setMaximizable(true);
        setResizable(true);

        pack();
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    // End of variables declaration//GEN-END:variables

    private static UIViewerReport instance;
    private boolean windViewerOpen = false;


    public static UIViewerReport getInstance() {
        if(instance ==null)
            instance= new UIViewerReport();
        return instance;
    }

     private void formInternalFrameClosed(javax.swing.event.InternalFrameEvent evt) {
         windViewerOpen = false;
         instance=null;
     }

    public boolean isWindViewerOpen() {
        return windViewerOpen;
    }

    public void setWindViewerOpen(boolean windViewerOpen) {
        this.windViewerOpen = windViewerOpen;
    }
    
}
